package studey2;

public class AnimalDemo {
    public static void main(String[] args) {
        Jumping j =new Cat();
        j.Jump();
        System.out.println("!!!");

        Eating e =new Cat();
        e.eat();
        System.out.println("!!!");
        System.out.println("--------------");
        Animal a=new Cat();


        a.setName("加菲");
        a.setAge(5);
        System.out.println(a.getName()+","+a.getAge());
        a.eat();

        a =new Cat("加菲",5);
        System.out.println(a.getName()+","+a.getAge());
        a.eat();
    }
}
